package functions;
import android.content.Context;
import android.util.Log;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: MoiMini
 * Date: 06/10/13
 * Time: 20:06
 * To change this template use File | Settings | File Templates.
 */
public class Home {
    Context context;

    private item product;
    Init init_mod;

    public Home(Context context_r) {
        this.context = context_r;
        this.init_mod = new Init(this.context);
    }

    public item new_item(String SKU, String Name, Integer Stock) {
        //create item with the data
        product = new item(SKU, Stock, Name);
        //save the data into the DB
        init_mod.Init_item(product);
        //Create barcode and stickers
        //init_mod.generate_Qr(product);
        //send email
        return product;
    }

    public ArrayList show_all(){

        ArrayList<item> myitems;
        myitems = init_mod.show_all() ;
        return( myitems);
    }


    public void search_item() {
    }

    public void add_item() {
    }
}
